import request from '@/utils/request'
const depart = {
  getPositionListAPI: function (params) {
    return request({
      url: '/sys/position/list',
      method: 'post',
      data: params
    })
  },
  getPositionMenuListAPI: function (positionCode) {
    return request({
      url: '/sys/position/menu/list/' + positionCode,
      method: 'get'
    })
  },
  deletePositionAPI: function (params) {
    return request({
      url: '/sys/position/delete/' + params.positionCode,
      method: 'delete'
    })
  },
  addPositionAPI: function (params) {
    return request({
      url: '/sys/position/add',
      method: 'post',
      data: params
    })
  },
  savePositionRightAPI: function (params) {
    return request({
      url: '/sys/position/menu/save',
      method: 'post',
      data: params
    })
  },
  updatePositionAPI: function (params) {
    return request({
      url: '/sys/position/update/' + params.positionCode,
      method: 'put',
      data: params
    })
  }
}
export default depart
